import { DefaultTheme } from 'vitepress'

export default [
  { link: '/utils/debounce/' },
  { link: '/utils/throttle/' },
  { link: '/utils/throttle-and-debounce/' },
  { link: '/utils/sleep/' },
  { link: '/utils/random/' },
  { link: '/utils/pick/' },
  { link: '/utils/omit/' },
  { link: '/utils/unique/' },
  { link: '/utils/typeof/' },
  { link: '/utils/get-error-message/' },
  { link: '/utils/perform-task/' },
  { link: '/utils/create-expirable-promise/' },
  { link: '/utils/semver/' },
  { link: '/utils/has-circular-reference/' },
  { link: '/utils/calculate-height-percentages/' },
  { link: '/utils/has-decimal/' },
  { link: '/utils/get-tan-deg/' },
  { link: '/utils/parse-query/' },
  { link: '/utils/onion-model/' },
  {
    text: '字符串处理',
    items: [
      { link: '/utils/format-amount/' },
      { link: '/utils/format-bytes/' },
      { link: '/utils/format-duration/' },
      { link: '/utils/format-distance-time/' },
      { link: '/utils/add-thousands-separator/' },
      { link: '/utils/add-myriad-separator/' },
      { link: '/utils/trim-extra-slashes/' },
    ],
  },
  {
    text: '颜色相关',
    items: [
      { link: '/utils/color-transform/' },
      { link: '/utils/random-color/' },
    ],
  },
  {
    text: '时间相关',
    items: [
      { link: '/utils/day-of-year/' },
      { link: '/utils/relative-day/' },
    ],
  },
  {
    text: '浏览器专属',
    items: [
      { link: '/utils/browser/select-file/' },
      { link: '/utils/browser/load-image/' },
      { link: '/utils/browser/get-image-average-color/' },
      { link: '/utils/browser/get-image-dimensions/' },
      { link: '/utils/browser/is-vector-image/' },
      { link: '/utils/browser/canvas-to-blob/' },
      { link: '/utils/browser/canvas-to-data-url/' },
      { link: '/utils/browser/blob-to-base64/' },
      { link: '/utils/browser/image-to-canvas/' },
      { link: '/utils/browser/get-scroll-offset/' },
      { link: '/utils/browser/copy-text/' },
      { link: '/utils/browser/copy-file/' },
      { link: '/utils/browser/copy-image/' },
      { link: '/utils/browser/download/' },
      { link: '/utils/browser/observe-resize/' },
      { link: '/utils/browser/observe-intersection/' },
    ],
  },
  {
    text: 'Node.js 专属',
    items: [
      { link: '/utils/nodejs/check-port/' },
      { link: '/utils/nodejs/delete-folder-recursive/' },
      { link: '/utils/nodejs/is-sub-path/' },
      { link: '/utils/nodejs/paths-equal/' },
      { link: '/utils/nodejs/random-buffer/' },
      { link: '/utils/nodejs/mkdir-if-not-exists/' },
      { link: '/utils/nodejs/get-file-hash/' },
      { link: '/utils/nodejs/sort-paths/' },
    ],
  },
  {
    text: '项目实践',
    items: [{ link: '/utils/token/' }, { link: '/utils/jsconfig-alias/' }],
  },
  { link: '/utils/github/' },
  { link: '/utils/npm/' },
] satisfies DefaultTheme.Sidebar
